package com.example.coupon.dao;

import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.Date;

@Mapper
public interface UserCouponMapper {
    @Insert("insert into user_coupon (user_id, coupon_id, status, obtain_time) values " +
            "(#{userId}, #{couponId}, #{status}, #{obtainTime})")
    Integer insertUserCoupon(@Param("userId") Long userId, @Param("couponId") Long couponId,
                             @Param("status") Integer status, @Param("obtainTime") Date obtainTime);
}